﻿Imports System.Runtime.Serialization

''' <summary>
''' Game客户端异常。
''' </summary>
''' <remarks></remarks>
Public Class GameException
    Inherits Exception

    Sub New()
        MyBase.New()
    End Sub

    Sub New(ByVal message As String)
        MyBase.New(message)
    End Sub

    Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
        MyBase.New(info, context)
    End Sub

    Sub New(ByVal message As String, ByVal innerException As Exception)
        MyBase.New(message, innerException)
    End Sub

    Sub New(ByVal errorCode As String, ByVal errorMsg As String)
        MyBase.New(errorCode & ":" & errorMsg)
        mErrorCode = errorCode
        mErrorMsg = errorMsg
    End Sub

    ReadOnly Property ErrorCode As String
        Get
            Return mErrorCode
        End Get
    End Property
    Private mErrorCode As String

    ReadOnly Property ErrorMsg As String
        Get
            Return mErrorMsg
        End Get
    End Property
    Private mErrorMsg As String

End Class